package com.quectel.business.pay.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * 前端创建订单需要的参数
 *
 * @author: caolu
 * @email: louis.cao@quectel.com
 * @date: 2023-03-27 12:52:00
 */
@Data
@Schema
public class CreateOrderRequest {
    @Schema(description = "租户id 无需前端传入")
    private Long tenantId;
    @Schema(description = "小区id 无需前端传入")
    private Long villageId;
    @Schema(description = "手机号 需要前端传入 但可以为空")
    private String mobile;

    @Schema(description = "微信JSAPI支付时必传 和PayController.getWxJSSDKConfig(xx)有关系")
    private String authCode;

    @Schema(description = "业务类型 比如：PropertyFee 需要前端传入")
    @NotBlank
    private String businessType;

    @Schema(description = "购买人唯一标识")
    private String buyerId;

    @Schema(description = "1支付宝 2微信 3小程序 需要前端传入")
    @NotNull
    private Byte payType;

    @Schema(description = "1 JSAPI 2 app 需要前端传入")
    @NotNull
    private Byte terminalType;

    @Schema(description = "1Android2iOS 需要前端传入")
    @NotNull
    private Byte mobileType;

    @Schema(description = "其他业务参数 用于创建业务订单使用")
    private Map<String, Object> otherBusinessParams;
}
